package com.cskaoyan.service;

import com.cskaoyan.exception.StockValidationException;
import com.cskaoyan.model.bo.CartBO;
import com.cskaoyan.model.bo.CheckOutOrderBO;
import com.cskaoyan.model.vo.CartVO;
import com.cskaoyan.model.vo.CheckOutOrderVO;
import com.cskaoyan.model.vo.UpdateOrderVO;

import java.util.List;

/**
 * @program: mall38
 * @description:
 * @author: Lexis
 * @create: 2022-05-08 22:22
 **/

public interface CartService {
    CartVO queryCartInfo(String username);

    void updateCheckedByGoodsId(CartBO cartBO, String username);

    void updateOrderById(UpdateOrderVO updateOrderVO);

    CartVO deleteOrderByProductId(List<Integer> productIds, String username);

    CheckOutOrderVO checkOutOrder(CheckOutOrderBO check, String username);

    Integer queryCartGoodsCountByUsername(String username);

    Integer add(String username, int goodsId, int number, int productId) throws StockValidationException;
}
